<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p4_页面版心与居中</title>
</head>
<style>
    .main {
        background-color: lightgreen;
    }
    .center {
        width: 800px;
        background-color: lightseagreen;
    }
    .card {
        width: 200px;
        height: 300px;
        background-color: lightcoral;
        border: 5px solid black;
        text-align: center;
        line-height: 300px;
        margin: 0 auto;
    }
</style>
<body>
<!--页面某一个功能-->
    <div class="main">
<!--        页面版心-->
        <div class="center">
            <div class="card">我是内容</div>
            <div class="card">我是内容</div>
            <div class="card">我是内容</div>
        </div>
    </div>
</body>
</html>